Auto merge of #1668 - alexcrichton:perf, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 3 Jun 2015 05:11:43 +0000 (05:11 +0000)
committerbors <bors@rust-lang.org>
Wed, 3 Jun 2015 05:11:43 +0000 (05:11 +0000)
commit69c2af26cfac655d3358d8de6c85e1d0c6b7fbb6
treebba959651a1bbb59e0a92551bfc7764fa6f2eb4e
parent266100c5f0957b4e952ebf5a2926e6e40b8331f5
parente5a870bb6f1e956913a838a796127a6b6b290bc7
Auto merge of #1668 - alexcrichton:perf, r=alexcrichton

Playing around with Servo recently I realized that a "noop build" (e.g. `cargo build` had no work to do) took about 5s to complete on my machine! I wasn't super happy with this performance, so I investigated the performance and applied a number of optimizations as part of this PR:

* Primarily, algorithmic changes were made to not traverse the dependency graph too often. There were previously two code paths where each node in the graph would traverse its entire subgraph, causing excessively high runtimes.
* Many minor changes were made to reduce allocations and in general cache results between invocations.
* The Rust version in use was updated to pick up the recent change to look at `DT_DIR` for `DirEntry::file_type`

Overall this PR improves a noop build of Servo from 5s to 0.5s on my machine.